package a01ooppolymorphismDemo;

public class Person {
    //定义属性
    private String name;
    private int age;

    //定义构造方法

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    //定义getter和setter方法

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //定义一个show方法
    public void show(){
        System.out.println(getName()+", "+getAge());
    }
}
